Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the unstable behavior of 'test_where_warning' #4747

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

Retribution98
Copy link
Contributor

An unexpected 'test_where_warning' failure occurred if the test was restarted. This happens because the compiler uses the cache and does not write a warning. The environment parameter 'TRITON_ALWAYS_COMPILE' is now used to skip the cache.

  • I am not making a trivial change, such as fixing a typo in a comment.

  • I have written a PR description following these
    rules.

  • I have run pre-commit run --from-ref origin/main --to-ref HEAD.

  • Select one of the following.

    • I have added tests.
      • /test for lit tests
      • /unittest for C++ tests
      • /python/test for end-to-end tests
    • This PR does not need a test because FILL THIS IN.
  • Select one of the following.

    • I have not added any lit tests.
    • The lit tests I have added follow these best practices,
      including the "tests should be minimal" section. (Usually running Python code
      and using the instructions it generates is not minimal.)

@@ -341,7 +341,7 @@ def kernel(a=1, B: tl.constexpr = ""):
triton.compile(triton.compiler.ASTSource(fn=kernel, signature={'a': 'i32'}, constants={'B': ""}))


def test_where_warning():
def test_where_warning(monkeypatch):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use the existing fresh_triton_cache

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much! I didn't know about this option, but it's a great fit.
I have updated the PR.

An unexpected 'test_where_warning' failure occurred if the test was restarted.
This happens because the compiler uses the cache and does not write a warning.
The environment parameter 'TRITON_ALWAYS_COMPILE' is now used to skip the cache.

Signed-off-by: Kirill Suvorov <[email protected]>
@ThomasRaoux ThomasRaoux merged commit 9df25c5 into triton-lang:main Sep 18, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants